package com.itboye.eweilisten.me.timu.adapter;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TableLayout;
import android.widget.TextView;

import com.itboye.eweilisten.R;
import com.itboye.eweilisten.util.widget.FlowLayout;
import com.itboye.eweilisten.util.widget.MyListView;
import com.itboye.eweilisten.util.widget.OtherGridView;

/**
 * 做题通用类型的holder
 */
public class TiHolder {
    /**
     * 选词填空（6202 类型）
     */
    public static class XuanCiHolder extends RecyclerView.ViewHolder{
        public FlowLayout questionLine;
        public FlowLayout answerLine;
        public TextView timu_num,txt_topicName;

        public XuanCiHolder(View itemView) {
            super(itemView);
            questionLine = (FlowLayout) itemView.findViewById(R.id.questionLine);
            answerLine = (FlowLayout) itemView.findViewById(R.id.answerLine);
            timu_num = (TextView) itemView.findViewById(R.id.timu_num);
            txt_topicName= (TextView) itemView.findViewById(R.id.txt_topicName);
        }
    }

    /**
     * 表格(6231 类型)
     */
    public static class BiaoGeHolder extends RecyclerView.ViewHolder{
        public TextView timu_num,txt_topicName;
        public TableLayout tableLayout;
        public FlowLayout answerLine;

        public BiaoGeHolder(View itemView) {
            super(itemView);
            timu_num = (TextView) itemView.findViewById(R.id.timu_num);
            tableLayout = (TableLayout) itemView.findViewById(R.id.tableLayout);
            answerLine = (FlowLayout) itemView.findViewById(R.id.answerLine);
            txt_topicName= (TextView) itemView.findViewById(R.id.txt_topicName);
        }
    }

    /**
     * 单选（6226 类型）
     */
    public static class DanXuanHolder extends RecyclerView.ViewHolder{
        public TextView timu_num,txt_topicName;
        public FlowLayout questionLine;
        public FlowLayout answerLine;

        public DanXuanHolder(View itemView) {
            super(itemView);
            timu_num = (TextView) itemView.findViewById(R.id.timu_num);
            questionLine = (FlowLayout) itemView.findViewById(R.id.questionLine);
            answerLine = (FlowLayout) itemView.findViewById(R.id.answerLine);
            txt_topicName= (TextView) itemView.findViewById(R.id.txt_topicName);
        }
    }

    /**
     * 图片判断（6228 类型）
     */
    public static class PanDuanIMGHolder extends RecyclerView.ViewHolder {
        public TextView danxuan_title,txt_topicName;
        public ImageView danxuan_image;
        public LinearLayout answerLine;

        public PanDuanIMGHolder(View itemView) {
            super(itemView);
            danxuan_title = (TextView) itemView.findViewById(R.id.danxuan_title);
            danxuan_image = (ImageView) itemView.findViewById(R.id.danxuan_image);
            answerLine = (LinearLayout) itemView.findViewById(R.id.answerLine);
            txt_topicName= (TextView) itemView.findViewById(R.id.txt_topicName);
        }
    }


    /**
     * 单词拼写  单词听写（6233，6229 类型）两者的区别是拼写每个空一格字符，听写是可以输入多个
     */
    public static class DanCiPXHolder extends RecyclerView.ViewHolder {
        public TextView timu_num,txt_topicName;
        public FlowLayout answerLine;

        public DanCiPXHolder(View itemView) {
            super(itemView);
            timu_num = (TextView) itemView.findViewById(R.id.timu_num);
            answerLine = (FlowLayout) itemView.findViewById(R.id.answerLine);
            txt_topicName= (TextView) itemView.findViewById(R.id.txt_topicName);
        }
    }

    /**
     * 语句判断（6230 类型）
     */
    public static class PanDuanYJHolder extends RecyclerView.ViewHolder {
        public FlowLayout questionLine;
        public LinearLayout answerLine;
        public TextView timu_num,txt_topicName;
        public TextView question;

        public PanDuanYJHolder(View itemView) {
            super(itemView);
            questionLine = (FlowLayout) itemView.findViewById(R.id.questionLine);
            answerLine = (LinearLayout) itemView.findViewById(R.id.answerLine);
            timu_num = (TextView) itemView.findViewById(R.id.timu_num);
            question = (TextView) itemView.findViewById(R.id.question);
            txt_topicName= (TextView) itemView.findViewById(R.id.txt_topicName);
        }
    }

    /**
     *  情景对话（6232 类型）
     */
    public static class DuiHuaHolder extends RecyclerView.ViewHolder {
        public TextView timu_num,txt_topicName;
        public LinearLayout questionLine;
        public FlowLayout answerLine;
        public LinearLayout questionLines;

        public DuiHuaHolder(View itemView) {
            super(itemView);
            timu_num = (TextView) itemView.findViewById(R.id.timu_num);
            questionLine = (LinearLayout) itemView.findViewById(R.id.questionLine);
            answerLine = (FlowLayout) itemView.findViewById(R.id.answerLine);
            questionLines = (LinearLayout) itemView.findViewById(R.id.questionLines);
            txt_topicName= (TextView) itemView.findViewById(R.id.txt_topicName);
        }
    }

    /**
     *  图片选择（6203 类型）
     */
    public static class XuanZeIMGHolder extends RecyclerView.ViewHolder {
        public TextView two_title,txt_topicName;
        public OtherGridView goods_gridView;

        public XuanZeIMGHolder(View itemView) {
            super(itemView);
            two_title = (TextView) itemView.findViewById(R.id.two_title);
            goods_gridView = (OtherGridView) itemView.findViewById(R.id.goods_gridView);
            txt_topicName= (TextView) itemView.findViewById(R.id.txt_topicName);
        }
    }
    /**
     *  完形填空（6227 类型）
     */
    public static class WanXingHolder extends RecyclerView.ViewHolder {
        public TextView questionLine;
        public MyListView answerLine;
        public TextView timu_num,txt_topicName;

        public WanXingHolder(View itemView) {
            super(itemView);
            questionLine = (TextView) itemView.findViewById(R.id.questionLine);
            answerLine = (MyListView) itemView.findViewById(R.id.answerLine);
            timu_num = (TextView) itemView.findViewById(R.id.timu_num);
            txt_topicName= (TextView) itemView.findViewById(R.id.txt_topicName);
        }
    }
}
